package com.example.project.common.tools;

import lombok.Data;

/**
 * @author: Jerry.Zhang
 * @date: 2022/3/10 18:40
 */
@Data
public class AppException extends RuntimeException {

    private String code;
    private String message;

    public AppException(ResponseEnum responseEnum){
        this.code = responseEnum.getCode();
        this.message = responseEnum.getMessage();
    }

    public AppException(String code, String message) {
        this.code = code;
        this.message = message;
    }
}
